﻿package morn.core.managers
{

    public class LangManager extends Object
    {
        private var _data:Object;

        public function LangManager()
        {
            this._data = {};
            return;
        }// end function

        public function get data() : Object
        {
            return this._data;
        }// end function

        public function set data(param1:Object) : void
        {
            this._data = param1;
            return;
        }// end function

        public function getLang(param1:String, ... args) : String
        {
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            args = this._data[param1] || param1;
            if (args.length > 0)
            {
                _loc_4 = 0;
                _loc_5 = args.length;
                while (_loc_4 < _loc_5)
                {
                    
                    args = args.replace("{" + _loc_4 + "}", args[_loc_4]);
                    _loc_4++;
                }
            }
            return args;
        }// end function

    }
}
